import request from '../utils/request'

export function getById(id,params){
    return request.get(`/users/${id}`,{params:params})
}

export function getList(params){
    return request.get('/users',{params:params})
}
export function Add(data){
    return request.post('/users',data)
}

export function Update(id,data){
    return request.put(`/users/${id}`,data)
}
export function Delete(id){
    return request.delete(`/users/${id}`)
}
export function Login(data){
    return request.post('/users/token',data)
}
export function Username(username,params){
    return request.get(`/users/content/${username}`,{params:params})
}